/*
 * @Author: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @Date: 2025-06-22 19:16:38
 * @LastEditors: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @LastEditTime: 2025-06-25 08:44:47
 * @FilePath: /server/workspace/tests/configtest.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include"../src/base/config.h"
#include"../src/base/Log.h"
#include<vector>
Yizhi::ConfigVar<int>::ptr get_int_value=Yizhi::Config::Lookup("system.port",(int)8080);
Yizhi::ConfigVar<std::vector<int>>::ptr get_int_vec_value=Yizhi::Config::Lookup("system.int_vec",std::vector<int>{1,2,3});
Yizhi::ConfigVar<std::map<std::string,int>>::ptr get_map_value=Yizhi::Config::Lookup("system.map",std::map<std::string,int>{{"a",1},{"b",2},{"c",3}});
void test_config(){
   Yizhi::Logger::ptr log=SERVER_LOG_NAME("system");
   SERVER_LOG_DEBUG(log)<<"hello";
   YAML::Node node=YAML::LoadFile("/home/heyizhi/server/workspace/bin/conf/log.yml");
   Yizhi::Config::LoadFromYaml(node);
   //std::cout<<Yizhi::LogLevel::Tostring(log->getLevel());
   SERVER_LOG_DEBUG(log)<<"ss";
   
}
int main(){
    test_config();
    return 0;
}